<?php
	require(APPPATH.'libraries/REST_Controller.php');
	class Example_api extends REST_Controller 
	{
	function user_get()
	{		
		$data = array('returned: '.$this->get('id'));
		$id =(int) $this->get('id');				
		if($id== 1)
		{			
			$data = array('returned: '=> $this->get('id'));
			$this->response($data);
		}
		else
		{
			$this->response(array('error' => 'User	 not found',404));
		}
	}	
	function user_put()
	{
		$data = array('returned: '.$this->put('id'));
		$this->response($data);
	}
	function user_post()
	{
		$data = array('returned: '.$this->post('id'));
		$this->response($data);
	}
	function user_delete()
	{
		$data = array('returned: '.$this->delete('id'));
		$this->response($data);
	}
}
?>